package com.ruoyi.spot.realtime.orderbook.service.impl;

import java.util.List;

import com.ruoyi.spot.realtime.orderbook.domain.VO.SpotOrderbookRealtimeDataVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.spot.realtime.orderbook.mapper.SpotOrderbookRealtimeDataMapper;
import com.ruoyi.spot.realtime.orderbook.domain.SpotOrderbookRealtimeData;
import com.ruoyi.spot.realtime.orderbook.service.ISpotOrderbookRealtimeDataService;

/**
 * 实时订单簿Service业务层处理
 * 
 * @author saumell
 * @date 2024-08-02
 */
@Service
public class SpotOrderbookRealtimeDataServiceImpl implements ISpotOrderbookRealtimeDataService 
{
    @Autowired
    private SpotOrderbookRealtimeDataMapper spotOrderbookRealtimeDataMapper;

    /**
     * 查询实时订单簿
     * 
     * @param id 实时订单簿主键
     * @return 实时订单簿
     */
    @Override
    public SpotOrderbookRealtimeDataVO selectSpotOrderbookRealtimeDataById(Integer id)
    {
        return spotOrderbookRealtimeDataMapper.selectSpotOrderbookRealtimeDataById(id);
    }

    /**
     * 查询实时订单簿列表
     * 
     * @param spotOrderbookRealtimeData 实时订单簿
     * @return 实时订单簿
     */
    @Override
    public List<SpotOrderbookRealtimeDataVO> selectSpotOrderbookRealtimeDataList(SpotOrderbookRealtimeDataVO spotOrderbookRealtimeData)
    {
        return spotOrderbookRealtimeDataMapper.selectSpotOrderbookRealtimeDataList(spotOrderbookRealtimeData);
    }

    /**
     * 新增实时订单簿
     * 
     * @param spotOrderbookRealtimeData 实时订单簿
     * @return 结果
     */
    @Override
    public int insertSpotOrderbookRealtimeData(SpotOrderbookRealtimeData spotOrderbookRealtimeData)
    {
        return spotOrderbookRealtimeDataMapper.insertSpotOrderbookRealtimeData(spotOrderbookRealtimeData);
    }

    /**
     * 修改实时订单簿
     * 
     * @param spotOrderbookRealtimeData 实时订单簿
     * @return 结果
     */
    @Override
    public int updateSpotOrderbookRealtimeData(SpotOrderbookRealtimeData spotOrderbookRealtimeData)
    {
        return spotOrderbookRealtimeDataMapper.updateSpotOrderbookRealtimeData(spotOrderbookRealtimeData);
    }

    /**
     * 批量删除实时订单簿
     * 
     * @param ids 需要删除的实时订单簿主键
     * @return 结果
     */
    @Override
    public int deleteSpotOrderbookRealtimeDataByIds(Integer[] ids)
    {
        return spotOrderbookRealtimeDataMapper.deleteSpotOrderbookRealtimeDataByIds(ids);
    }

    /**
     * 删除实时订单簿信息
     * 
     * @param id 实时订单簿主键
     * @return 结果
     */
    @Override
    public int deleteSpotOrderbookRealtimeDataById(Integer id)
    {
        return spotOrderbookRealtimeDataMapper.deleteSpotOrderbookRealtimeDataById(id);
    }

    @Override
    public List<SpotOrderbookRealtimeDataVO> selectSpotAllData() {
        return spotOrderbookRealtimeDataMapper.selectSpotAllData();
    }

    @Override
    public Integer queryCurryNumber(String currencyPair) {
        return spotOrderbookRealtimeDataMapper.queryCurryNumber(currencyPair);
    }
}
